/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.diplomka.servicelayer.gamelogic.manager;

import cz.fi.muni.diplomka.common.Coordinates;
import cz.fi.muni.diplomka.common.enumeration.TileType;
import cz.muni.fi.diplomka.servicelayer.dto.Tile;
import java.util.List;

/**
 * Interface for manipulating with game world
 *
 * @author Jakub Kutil
 */
public interface WorldManager {

    /**
     * Creates new game world with size x * y
     *
     * @param x x-dimension of game world
     * @param y y-dimension of game world
     */
    public void generateWorld(int x, int y);

    /**
     * Fills part of world with number of specified Tiles
     *
     * @param world world to fill
     * @param x x-coordinates of upper left corner of square to fill
     * @param y y-coordinates of upper left corner of square to fill
     * @param count number of Tiles to add to
     * @param type type of terrain to add
     */
    public void addTerrain(List<Tile> world, int x, int y, int count, TileType type);

    /**
     * Enlarges current game world
     */
    public void enlargeWorld();

    /**
     * Gets Coordinates of upper left corner
     *
     * @return upper left corner Coordinates
     */
    public Coordinates getUpperLeftCorner();

    /**
     * Gets Coordinates of lower right corner
     *
     * @return upper lower right Coordinates
     */
    public Coordinates getLowerRightCorner();

    /**
     * Gets whole game world
     *
     * @return list of all Tiles on game world
     */
    public List<Tile> getWorld();

    /**
     * Gets 10x10 part of game world
     *
     * @param x x-coordinates of upper left corner of part of game world
     * @param y y-coordinates of upper left corner of part of game world
     * @return list of Tile in specified part
     */
    public List<Tile> getSquareOfWorld(int x, int y);

    /**
     * Gets Tile at specified position
     *
     * @param x x-coordinates of Tile to get
     * @param y y-coordinates of Tile to get
     * @return Tile at specified position
     */
    public Tile getTileAtPosition(int x, int y);

    /**
     * Edits specified Tile
     *
     * @param tile Tile to edit
     */
    public void editTile(Tile tile);
}
